import pprint
import requests
for page in range(0,5):
    print("==================正在爬取第{}页数据=================".format(page))
    base_url='https://www.ku6.com/video/feed?pageNo={}&pageSize=40&subjectId=76'.format(page)
    headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36'
        }
    response=requests.get(base_url,headers=headers)
    print(type(response))
    data=response.json()
    print(type(data))
    # data_list=data['data']#列表
    # #print(data_list)
    # for i in data_list:
    #     vedio_title=i["title"]+".mp4"
    #     vedio_url=i["playUrl"]
    #
    #     vedio_data=requests.get(vedio_url,headers=headers).content
    #
    #     with open('酷六//'+vedio_title,'wb') as f:
    #         print("正在下载", vedio_title)
    #         f.write(vedio_data)
    #         print("下载完成...")